/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-06-29 17:18:16
 * @LastEditTime: 2019-06-30 10:29:44
 * @Description: http://www.sbotlp.com.cn
 */
import * as constants from '../constants/ConstantsTypes';
export interface OpenLoadingConstants {
  type: constants.OPEN_LOADING;
  body: boolean;
}
export interface CloseLoadingConstants {
  type: constants.COLSE_LOADING;
  body: boolean;
}
export type LoadingConstants = OpenLoadingConstants | CloseLoadingConstants;
export function openLoading () {
  return dispatch => dispatch({
    type: constants.OPEN_LOADING,
    body: true
  })
}
export function closeLoading () {
  return dispatch => dispatch({
    type: constants.COLSE_LOADING,
    body: false
  })
}